package type;

/**
 * @Date 2021/4/25 5:55 下午
 * @Author dengxin
 */
public class ClassTest {

    public static void main(String[] args) {
        resolveType("");
        resolveType(1);
        resolveType(1.1);
    }

    private static <T> void resolveType(T t) {
        Class<?> type = t.getClass();
        System.out.println(type.getCanonicalName());
        System.out.println(type.getTypeName());
        System.out.println(type.getSimpleName());
        System.out.println(t instanceof String);
        System.out.println(type.isInterface());
    }
}
